var twitteverest = {
	
	names : null,
	languages : null,
	
	init : function(){
		$$('.addbut').each(function(elem){
			Event.observe(elem, 'click', twitteverest.addToList);
		});
		Event.observe($('selectLang'), 'click', twitteverest.setLanguage.bindAsEventListener(this));
		Event.observe($('StarIndexForm'), 'submit', twitteverest.searchSubmit.bindAsEventListener(this));
		this.names = $('StarTheNames');
		this.languages = $('languages');
	},//twitteverest.init
	
	setLanguage : function(){
		this.languages.show();
		},//twitteverest.setLanguage
	
	searchSubmit : function(){
		$('StarSearch').hide();
		$('loader').show();
		},//twitteverest.searchSubmit
	
	addToList : function(){
		if(twitteverest.names.value.search(this.value) == -1)
			twitteverest.names.value += ' ' + this.value;
		}//twitteverest.addToList
  
}

document.observe('dom:loaded', function(){
	twitteverest.init();
	});